<!DOCTYPE html>
<html>
<head>
<title>[mccms_title]</title>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" >
<meta name="keywords" content="[mccms_keywords]">
<meta name="description" content="[mccms_description]">
[mccms_packs_author]
</head>
<body class="p-comic-info">
[mccms_head_author]
<!-- 内容 -->
<div class="main-container">
  [mccms_left_author]
  <script>$('#left-comic').addClass('aside-user--selected');</script>
  <!-- main-content -->
  <div class="user-right">
    <div class="user-right-top">
      <h3>[comic:name]</h3>
      <a href="[mccms_url_author_comic]" class="to-mycomic">返回我的作品 ></a>
    </div>
    <div class="comic-box">
      <div class="chapter-nav clearfix">
        <a href="[mccms_url_author_chapter_index_[comic_id]]" >章节管理</a>
        <a href="[mccms_url_author_comic_info_[comic_id]]" class="on">作品概要</a>
      </div>
      <form class="input-box layui-form">
        <div class="edit-box clearfix">
          <div class="comic-cover">
            <div class="y-cover">
              <img src="[comic:pic]"/>
              <span class="upload-btn J_cover_y">上传封面</span>
            </div>
            <div class="x-cover">
              <img src="[comic:picx]" />
              <span class="upload-btn J_cover_x">上传封面</span>
            </div>
          </div>
          <div class="comic-info">
            <div class="layui-form-item"></div>
            <div class="layui-form-item">
              <label class="layui-form-label">漫画名称：</label>
              <div class="layui-input-block">
                <input type="text" name="name" required lay-verify="required" placeholder="漫画标题" autocomplete="off" class="layui-input" value="[comic:name]">
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">图作者：</label>
              <div class="layui-input-block">
                <input type="text" name="pic_author" placeholder="漫画图作者" autocomplete="off" class="layui-input" value="[comic:pic_author]">
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">文作者：</label>
              <div class="layui-input-block">
                <input type="text" name="txt_author" placeholder="漫画文作者" autocomplete="off" class="layui-input" value="[comic:txt_author]">
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">分类：</label>
              <div class="layui-input-block">
                <select name="cid">
                  {mccms:class table="class" where="fid=0" order="xid asc"}
                  <option value="[class:id]"{if:[class:id]==[comic_cid]} selected{end if}>[class:name]</option>
                    {mccms:class2 table="class" where="fid=[class:id]" order="xid asc"}
                    <option value="[class2:id]"{if:[class2:id]==[comic_cid]} selected{end if}> |----[class2:name]</option>
                    {/mccms:class2}
                  {/mccms:class}
                </select>
              </div>
            </div>
            {mccms:type table="type" where="id in(1,3,6)" order="xid asc"}
            <div class="layui-form-item">
              <label class="layui-form-label">[type:name]：</label>
              <div class="layui-input-block">
                <ul>
                  <li class="ticai-list">
                    {mccms:type2 table="type" where="fid=[type:id]" order="xid asc"}
                    {if:[type:cid]==0}
                    <input class="type-[type2:zd]" lay-filter="theme" type="checkbox" name="type[[type2:zd]][]" title="[type2:name]" lay-skin="primary" value="[type2:id]"{if2:get_is_type([comic_id],[type2:id]) == true} checked{end if2}>
                    {else}
                    <input class="type-[type2:zd]" type="radio" name="type[[type2:zd]][]" value="[type2:id]" title="[type2:name]"{if2:get_is_type([comic_id],[type2:id]) == true} checked{end if2}>
                    {end if}
                    {/mccms:type2}
                  </li>
                </ul>
              </div>
            </div>
            {/mccms:type}
            <div class="layui-form-item">
              <label class="layui-form-label">进度：</label>
              <div class="layui-input-block">
                <input type="radio" name="serialize" value="连载" title="连载"{if:'连载'=='[comic_serialize]'} checked{end if}>
                <input type="radio" name="serialize" value="完结" title="完结"{if:'完结'=='[comic_serialize]'} checked{end if}>
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">一句话简介：</label>
              <div class="layui-input-block">
                <input type="text" name="text" required lay-verify="required" placeholder="用于首页及列表页漫画作品介绍，10字以内" autocomplete="off" class="layui-input" value="[comic_text]">
              </div>
            </div>

            <div class="layui-form-item layui-form-text">
              <label class="layui-form-label">漫画简介：</label>
              <div class="layui-input-block">
                <textarea name="content" required placeholder="讲讲这个漫画，让更多人了解" class="layui-textarea">[comic_content]</textarea>
              </div>
            </div>
            <div class="layui-form-item layui-form-text">
              <label class="layui-form-label">作品公告：</label>
              <div class="layui-input-block">
                <textarea name="notice" placeholder="作者大大还没有填写本漫画的公告！！！" class="layui-textarea">[comic_notice]</textarea>
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label"></label>
              <div class="layui-input-block">
                <button lay-submit lay-filter="stepOne" class="submit layui-btn">确认修改</button>
              </div>
            </div>
          </div>
        </div>
      </form>
    </div>
  </div>
  <!-- 弹窗 -->
  <div class="cover-dialog-y hide">
    <div class="y-wrap clearfix">
      <p class="title">竖向封面图</p>
      <p class="tip">仅支持JPG，PNG格式，文件小于5M，图片尺寸建议为：600*800（3:4）</p>
      <div class="cover-wrap-y">
        <img src="" class="cover" id="Cover-y">
        <label class="btn" for="yInput">
          <input type="file" name="image" id="yInput" onchange="loadImageY()" style="cursor:pointer;">
          <i class="ic-upimg"></i><span>选择您要上传的图片</span>
        </label>
      </div>
      <div class="gap"></div>
      <div class="preview-box">
        <p class="txt">效果预览</p>
        <p class="tip">你上传的图片会自动生成以下尺寸，请注意小尺寸的图片是否清晰</p>
        <div class="preview1 preview-y">
          <img src="[comic_pic]"/>
        </div>
        <div class="preview2 preview-y">
          <img src="[comic_pic]"/>
        </div>
      </div>
      <div class="handle-box">
        <span class="confirm J_confirm_y">确定</span>
        <span class="cancel">取消</span>
      </div>
    </div>
  </div>
  <div class="cover-dialog-x hide">
    <div class="x-wrap clearfix">
      <p class="title">横向封面图</p>
      <p class="tip">仅支持JPG，PNG格式，文件小于5M，图片尺寸建议为：640*360（16:9）</p>
      <div class="cover-wrap-x">
        <img src="" id="Cover-x">
        <label class="btn" for="xInput">
          <input type="file" name="image" id="xInput" onchange="loadImageX()" style="cursor:pointer;">
          <i class="ic-upimg"></i><span>选择您要上传的图片</span>
        </label>
      </div>
      <div class="gap"></div>
      <div class="preview-box">
        <p class="txt">效果预览</p>
        <p class="tip">请注意小尺寸的图片是否清晰</p>
        <div class="preview preview-x">
          <img src="[comic_picx]" />
        </div>
      </div>
      <div class="handle-box">
        <span class="confirm J_confirm_x">确定</span>
        <span class="cancel">取消</span>
      </div>
    </div>
  </div>
</div>
[mccms_bottom_author]
<link rel="stylesheet" href="[mccms_tpl]css/cropper.min.css">
<script src="[mccms_tpl]js/cropper.min.js"></script>
<script type="text/javascript">
var readerY = new FileReader();
var readerX = new FileReader();
var loadImageY = function() {
  var obj = document.getElementById('yInput')
  var oFile = obj.files[0]
  readerY.readAsDataURL(oFile)
}
var loadImageX = function() {
  var obj = document.getElementById('xInput')
  var oFile = obj.files[0]
  readerX.readAsDataURL(oFile)
}
$(function(){
  comic_edit([comic_id]);
})
</script>
</body>
</html>